package entity

var ExcelEntityNames = struct { // excel entities
	KbBrand string
}{
	KbBrand: "kbBrand",
}

type ColumnSetting struct {
	Index     int
	Head      string
	Type      string
	Select    []string
	Required  bool
	OmitEmpty bool
	Color     string
	Field     string
	SubField  string
	SubGroup  int
}

var ExcelEntityPreloadMap = map[string]map[string]*ColumnSetting{
	ExcelEntityNames.KbBrand: {
		"Id": &ColumnSetting{
			Index:     1,
			Head:      "Items",
			Type:      "int",
			Required:  true,
			OmitEmpty: false,
			Field:     "Id",
		},
		"Slug": &ColumnSetting{
			Index:     2,
			Head:      "原名",
			Type:      "string",
			Required:  true,
			OmitEmpty: false,
			Field:     "Slug",
		},
		"Title": &ColumnSetting{
			Index:     3,
			Head:      "中文名",
			Type:      "string",
			Required:  true,
			OmitEmpty: false,
			Field:     "Title",
		},
		"Nose": &ColumnSetting{
			Index:     4,
			Head:      "调香师",
			Type:      "string",
			Required:  false,
			OmitEmpty: true,
			Field:     "Nose",
			SubField:  "Slug",
		},
		"Year": &ColumnSetting{
			Index:     5,
			Head:      "上市年代",
			Type:      "string",
			Required:  true,
			OmitEmpty: false,
			Field:     "Year",
		},
		"Group": &ColumnSetting{
			Index:     6,
			Head:      "主调",
			Type:      "string",
			Required:  true,
			OmitEmpty: false,
			Field:     "Group",
			SubField:  "Title",
		},
		"TopNote": &ColumnSetting{
			Index:     7,
			Head:      "前调",
			Type:      "string",
			Required:  false,
			OmitEmpty: true,
			Field:     "Note",
			SubField:  "Title",
			SubGroup:  1,
		},
		"HeartNote": &ColumnSetting{
			Index:     8,
			Head:      "中调",
			Type:      "string",
			Required:  false,
			OmitEmpty: true,
			Field:     "Note",
			SubField:  "Title",
			SubGroup:  2,
		},
		"BaseNote": &ColumnSetting{
			Index:     9,
			Head:      "基调",
			Type:      "string",
			Required:  false,
			OmitEmpty: true,
			Field:     "Note",
			SubField:  "Title",
			SubGroup:  3,
		},
		"Rating": &ColumnSetting{
			Index:     10,
			Head:      "评分",
			Type:      "float",
			Required:  false,
			Field:     "Rating",
			OmitEmpty: true,
		},
	},
}
